<template>
  <el-card>
    <el-menu
        v-model="title"
        class="el-menu-demo"
        mode="horizontal"
        default-active='0'
        active-text-color="#f83683"
        @select="handleSelect">
      <el-menu-item v-for="(item,index) in Title" :index="index">{{ item }}</el-menu-item>
    </el-menu>
  </el-card>
  <el-card style="margin-top: 15px;height: 100vh">
    <el-form>
      <el-form :inline="true">
        <el-form-item>
          <el-input style="width: 200px">
            <template #prefix>
              <el-icon>
                <Search/>
              </el-icon>
            </template>
          </el-input>
          <el-button style="margin-left: 10px">搜索</el-button>
        </el-form-item>
        <el-form-item label="发布状态:">
          <el-select v-model="fbSelector">
            <el-option v-for="(item,index) in fbState" :value="index" :label="item"/>
          </el-select>
        </el-form-item>
        <el-form-item label="发布时间:">
          <el-date-picker
              style="width:220px"
              v-model="fbData"
              type="daterange"
              range-separator="To"
              start-placeholder="Start date"
              end-placeholder="End date"
          />
        </el-form-item>
      </el-form>
    </el-form>
    <el-row style="margin-top:15px">
      <el-table style="width: 100%">
        <el-table-column width="440px" align="center" label="内容"></el-table-column>
        <el-table-column width="80ox" align="center" label="发布时间"></el-table-column>
        <el-table-column width="120ox" align="center" label="价格"></el-table-column>
        <el-table-column width="120ox" align="center" label="数据"></el-table-column>
        <el-table-column width="80ox" align="center" label="销量/销售额"></el-table-column>
        <el-table-column width="120ox" align="center" label="状态"></el-table-column>
        <el-table-column width="120ox" align="center" label="操作"></el-table-column>
      </el-table>
    </el-row>
  </el-card>
</template>

<script setup lang="ts">

import {ref} from "vue";
import {Search} from "@element-plus/icons-vue";


const handleSelect = (key: string, keyPath: string[]) => {
  console.log(key, keyPath)
}
const fbSelector = ref('')
const fbData = ref('')
const fbState = ref(['已发布', '未发布', '审核中', '审核未通过', '已下架', '仅主页可见'])
const Title = ref(['全部商品', '线下课', '视频课', '直播课'])


</script>

<style lang="less" scoped>
.searchContainer {
  width: 270px;
}

</style>

